<template>
  <div class="slotScoped">
    <ScopedChild :name="name">
      <template v-slot="slotProps">
        <div>{{slotProps.item}}----{{slotProps.index}}</div>
      </template>
    </ScopedChild>
     <hr>
     <!-- 独占默认插槽的缩写 -->
     <ScopedChild :name="name" v-slot="why">
        <div>{{why.item}}----{{why.index}}</div>
    </ScopedChild>
  </div>
</template>
<script>
import ScopedChild from './SlotChild.vue'
export default {
  data () {
    return {
      name: ['zs', 'lisi', 'wangwu']
    }
  },
  components: {
    ScopedChild
  }
}
</script>
<style scoped>
</style>
